var express = require('express');
var favicon = require('serve-favicon');
var logger = require('morgan');
var path = require('path');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');

var app = express();

app.use(logger('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: false}));
app.use(cookieParser());

app.use(
    express.static(path.join(__dirname, 'public'), {
        maxAge: 0
    })
);
app.use(
    express.static(path.join(__dirname, 'public/lib'),
        {
            maxAge: 655525
        }
    )
);

module.exports = app;
